const login = {
    namespaced: true,
    state: {
        token: '54321'
    },
    mutations: {
        getToken(state, token) {
            state.token = token
        }
    },
    actions: {
        Login({ commit }) {
            return new Promise((resolve, reject) => {
                setTimeout(() => {
                    commit('getToken', '我是token')
                    resolve()
                }, 1000)
            })
        }
    }
}

export { login }
